package cn.com.zero.common.auth.security.vo;

import cn.com.zero.common.auth.security.po.AuthUserPO;
import cn.com.zero.api.auth.po.MenuPO;
import cn.com.zero.api.auth.po.PermissionPO;
import cn.com.zero.base.vo.BaseVO;

import java.util.List;

/**
 * @author xiongxj
 * @version 1.0.0
 * @Description 登录的用户信息
 * @createTime 2023/3/22 15:32
 */
public class LoginUserInfoVO extends BaseVO {

    private static final long serialVersionUID = 7272866190871089968L;
    /**
     * 用户ID
     */
    private String userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 手机号
     */
    private String mobile;

    /**
     * 用户token信息
     */
    private String token;

    /**
     * 用户无需登录就拥有的权限
     */
    private List<PermissionPO> publicPermissionList;

    /**
     * 用户只要需登录就拥有的权限
     */
    private List<PermissionPO> publicLoginPermissionList;

    /**
     * 用户特定的菜单权限
     */
    private List<MenuPO> menuList;

    /**
     * 克隆用户信息
     *
     * @param authUserPO 经过认证后的用户信息
     */
    public void cloneUserInfo(AuthUserPO authUserPO) {
        this.userId = authUserPO.getUserId();
        this.userName = authUserPO.getUserName();
        this.mobile = authUserPO.getMobile();
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public List<PermissionPO> getPublicPermissionList() {
        return publicPermissionList;
    }

    public void setPublicPermissionList(List<PermissionPO> publicPermissionList) {
        this.publicPermissionList = publicPermissionList;
    }

    public List<PermissionPO> getPublicLoginPermissionList() {
        return publicLoginPermissionList;
    }

    public void setPublicLoginPermissionList(List<PermissionPO> publicLoginPermissionList) {
        this.publicLoginPermissionList = publicLoginPermissionList;
    }

    public List<MenuPO> getMenuList() {
        return menuList;
    }

    public void setMenuList(List<MenuPO> menuList) {
        this.menuList = menuList;
    }
}
